<template>
  <!-- 测试$on,$emit,$off方法 -->
  <div>
    <Father></Father>
    <button @click="indexFn">indexBtn</button>
  </div>

</template>

<script>
  import Father from './Father'
  export default {
    name: "Index",
    components: {
      Father
    },
    methods: {
      indexFn() {
        this.$emit('clw', 'index')
      }
    },
    created() {
      this.$on('clw', function (param) {
        console.log('index',param)
      })
    }
  }
</script>

<style scoped>

</style>
